package com.sopragroup.dojo.webflow.person;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.NotEmpty;

/**
 * Ajouter des validateurs
 * @see NotEmpty
 *
 */
public class Person implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5043920048645536979L;
	@NotEmpty
	private String lastName;
	@NotEmpty
	private String firstName;
	@NotEmpty
	private Date birthdate;

	public Date getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	
	@Override
	public Person clone() throws CloneNotSupportedException {
		Person clone = new Person();
		clone.setBirthdate((Date) birthdate.clone());
		clone.setFirstName(firstName);
		clone.setLastName(lastName);
		
		return clone;
	}
	
}
